package com.educhains.module.blog.service;

import com.educhains.module.blog.vo.BlogContent;
import com.educhains.module.blog.vo.BlogReply;
import com.educhains.module.demo.vo.Page;
import com.educhains.module.blog.vo.Blog;

import java.util.List;

/**
 * @author YuRun
 * @since 2017年8月16日
 */
public interface BlogService {
    /**
     * Get Demo List
     *
     * @return
     */
    Page showByPage(int pageNum, int option);

    Blog findBlog(String blogId);

    BlogContent findBlogContent(String blogId);

    Page replyShowByPage(int pageNum, String blogId);

    void addBlog(String blogId, String blogName, String userId, String summary, int isOriginal, String blogContent);

    void addReadNum(String blogId);

    void addLike(String blogId);

    void subtractLike(String blogId);

    void addReplyNum(String blogId);

    void addReply(String replyId ,String blogId ,String userId, String content);

    List<BlogReply> getReply(String blogId, String locationId);

    void submitInFloorReply(String replyId, String userId, String blogId, String locationId, String content);
    /**
     * Get blog by user id
     * @param userId
     * @return
     */
    List<Blog> getBlogListByUserIdWithLimit(String userId, int limit);

    /**
     * Get blog reply by user id
     *
     * @param userId
     * @return
     */
    List<BlogReply> getBlogReplyListByUserIdWithLimit(String userId, int limit);

    /**
     * Get blog limits
     *
     * @param blogNum
     * @return
     */
    List<Blog> selectBlogListLimit(int blogNum, String type);
}
